from django.conf.urls import url
from . import views

app_name='blog'

urlpatterns = [
    # post views
    url(r'^index/$',views.index,name='index'),
    url(r'^$', views.post_list, name='post_list'),
    url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<post>[-\w]+)/$',
        views.post_detail,
        name='post_detail'),    # 正则表达式能够正确返回
        ]